home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cchh01.arc / SCREEN.H < prev    next >
Text File  |  1986-03-14  |  2KB  |  40 lines

  1. /*
  2.  *    Utilizing the ANSI.SYS driver, this header file can be used to
  3.  *    access certain screen functions.
  4.  */
  5. #define    COLOR 0xb800
  6. #define    MONO  0xb000
  7. #define ALLOFF 0
  8. #define BOLD 1
  9. #define UNDERSCORE 4
  10. #define BLINK 5
  11. #define REVERSE 7
  12. #define INVISIBLE 8
  13. #define BLACK 30
  14. #define RED 31
  15. #define GREEN 32
  16. #define YELLOW 33
  17. #define BLUE 34
  18. #define MAGENTA 35
  19. #define CYAN 36
  20. #define WHITE 37
  21. #define S40X25BW  0
  22. #define S40X25CL  1
  23. #define S80X25BW  2
  24. #define S80X25CL  3
  25. #define S320X200CL 4
  26. #define S320X200BW 5
  27. #define S640X200BW 6
  28.  
  29. #define   locate(x,y)   printf("\033[%d;%dH",x,y)  /* position cursor */
  30. #define   sgr(x)        printf("\033[%dm",x)       /* set foreground/background color */
  31. #define   cls()         printf("\033[2J")          /* clear screen */
  32. #define   sm(x)         printf("\033[=%dh",x)      /* set mode */
  33. #define   scp()         printf("\033[s")           /* save cursor position */
  34. #define   rcp()         printf("\033[u")           /* restore cursor position */
  35. #define   cuu(x)        printf("\033[%dA",x)       /* move cursor up x rows */
  36. #define   cub(x)        printf("\033[%dD",x)       /* move cursor back x cols. */
  37. #define   cuf(x)        printf("\033[%dC",x)       /* move cursor forward x cols. */
  38. #define   bcolor(c)     printf("\033[%dm", c+10)   /* set backgound color */
  39. #define   fcolor(c)     printf("\033[%dm", c)      /* set foreground color */
  40.